package com.example.learningspringboot.learningspringboot;

import reactor.core.publisher.Flux;

import java.util.function.Supplier;

public class FluxTest01 {
    public static void main(String[] args) {
        Flux.just("alpha", "bravo", "charlie")
                .subscribe(System.out::println);
        System.out.println("--------------------");

        Flux.just(
                (Supplier<String>)() -> "alpha",
                (Supplier<String>)() -> "bravo",
                (Supplier<String>)() -> "charlie"
        ).subscribe(supplier -> System.out.println(supplier.get()));

    }
}
